<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\cpmjagent\controller\finance;

/**
 * Description of RechargeController
 *
 * @author SoChishun
 */
class GemsdetailController extends \app\cpmjagent\controller\AppbaseController {

    public function gemsdetaillist() {
        $where=[];
        if(!$this->global_data['isadmin']){
            $where['user_id']=$this->global_data['userid'];
        }
        $list = \app\cpmjagent\model\finance\GemsDetailModel::where($where)->order('id desc')->paginate(20);
        $firstRowId = ($list->getCurrentPage() - 1) * $list->listRows();
        return view('', ['list' => $list, 'firstRowId' => $firstRowId]);
    }
}
